#define  _CRT_SECURE_NO_WARNINGS



#include<stdio.h>

int main()
{
    int n = 0, j = 0, i = 0, arr[100] = { 0 };
    scanf("%d", &n);
    if (n == 0)
        printf("0\n");
    else
    {
        while (n)
        {
            if (n % 2 == 0)
                arr[i] = 0;
            else if (n % 2 == 1 || n % 2 == -1)
            {
                arr[i] = 1;
                n--;
            }
            n /= -2;
            i++;
        }
        for (j = i - 1; j >= 0; j--)
            printf("%d", arr[j]);
    }
    return 0;
}